package com.ccl.iot;
import com.ccl.iot.IOTInterface.IOTIconMonitorInterface;
import com.ccl.iot.IOTInterface.IOTIconMonitorInterface.IOTIconChangeListener;

public class IOTIconMonitor extends IOTMonitor<IOTIconChangeListener> implements IOTIconMonitorInterface {
	private IOTIconMonitorInterface iSource = this;

	public IOTIconMonitor(){
		
	}

	public IOTIconMonitor(IOTIconMonitorInterface aSource){
		if (aSource != null){
			iSource = aSource;
		}
	}
	
	@Override
	public boolean addIconChangeListener(IOTIconChangeListener aListener) {
		return super.addMonitorListener(aListener);
	}
	
	@Override
	public boolean removeIconChangeListener(IOTIconChangeListener aListener){
		return super.removeMonitorListener(aListener);
	}

	public void onIconChange(String aIcon) {
		int tIndex = 0;
		IOTIconChangeListener tListener;
		
		while((tListener = super.getMonitorListener(tIndex++)) != null){
//			tListener.onIconChanged(iSource, aIcon);
		}
	}
}
